From: Tim Starling Date: Sun, 29 May 2005 06:22:43 +0000 (+0000) Subject: forward-ported $wgDisableHardRedirects X-Git-Tag: 1.5.0alpha2~44 X-Git-Url: http://git.cyclocoop.org/data/%22%7B%24u%7D/%5B%27/%7B%24admin_url%7Dmembres/%24self2&var_mode_affiche=squelette?a=commitdiff_plain;h=39b86844b6904f8b1357454acda6dece27aeda61;p=lhc%2Fweb%2Fwiklou.git forward-ported $wgDisableHardRedirects --- diff --git a/includes/Article.php b/includes/Article.php index c619a3c043..fe57a8dee5 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -246,7 +246,7 @@ class Article { * Load the revision (including cur_text) into this object */ function loadContent( $noredir = false ) { - global $wgOut, $wgRequest; + global $wgOut, $wgRequest, $wgDisableHardRedirects; if ( $this->mContentLoaded ) return; @@ -386,7 +386,7 @@ class Article { # Gotta hand redirects to special pages differently: # Fill the HTTP response "Location" header and ignore # the rest of the page we're on. - if( $globalTitle ) { + if( $globalTitle && !$wgDisableHardRedirects ) { global $wgOut; if ( $rt->getInterwiki() != '' && $rt->isLocal() ) { $source = $this->mTitle->getFullURL( 'redirect=no' ); diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 40d125cdff..61c8650b61 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1424,13 +1424,16 @@ $wgSortSpecialPages = true; * from the .../skins/ directory */ $wgSkipSkin = ''; -$wgSkipSkins = array(); # More of the same - /** * Array of disabled article actions, e.g. view, edit, dublincore, delete, etc. */ $wgDisabledActions = array(); +/** + * Disable redirects to special pages and interwiki redirects, which use a 302 and have no "redirected from" link + */ +$wgDisableHardRedirects = false; + /** * Use http.dnsbl.sorbs.net to check for open proxies */